package com.kqb.sgdrug.controller.feign;

import com.kqb.sgapi.drug.DrugFeignClient;
import com.kqb.sgcommon.base.response.Result;
import com.kqb.sgdrug.model.Drug;
import com.kqb.sgdrug.service.DrugService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 杉果树皮
 */
@RestController
public class DrugFeignController implements DrugFeignClient {
    @Resource
    private DrugService drugService;

    @Override
    public Result<?> list() {
        List<Drug> drugs = drugService.cacheGetAll();
        return Result.success(drugs);
    }
}
